package com.yundasys.lab03springbootshardingjdbc.controller;

import com.yundasys.lab03springbootshardingjdbc.entity.TOrderItem1;
import com.yundasys.lab03springbootshardingjdbc.service.TOrderItem1Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (TOrderItem1)表控制层
 *
 * @author makejava
 * @since 2021-01-09 20:22:41
 */
@RestController
@RequestMapping("tOrderItem1")
public class TOrderItem1Controller {
    /**
     * 服务对象
     */
    @Resource
    private TOrderItem1Service tOrderItem1Service;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public TOrderItem1 selectOne(String id) {
        return this.tOrderItem1Service.queryById(id);
    }

}